import React from 'react';
import {
    Button,
    Text,
    View,
    Image,
    StyleSheet,
    Dimensions,
    StatusBar,
    ActivityIndicator,
    FlatList,
    ScrollView,
    RefreshControl,
    Animated,
    TouchableHighlight,
    SectionList, TouchableOpacity, DeviceEventEmitter
} from 'react-native';
//引入
import ScrollableTabView, { DefaultTabBar, ScrollableTabBar } from 'react-native-scrollable-tab-view';
import app from '../../../app.json';
import Ugame from '../../../Ugame';
import Httpc from "../../utils/Httpc";
import REQUEST from "../../../REQUEST";
import Football from "../../utils/Football";
import Utils from "../../utils/Utils";

import Styles from './Styles';
const { width, height } = Dimensions.get('window')
import RootSiblings from 'react-native-root-siblings';

export default class TXShow extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            info: null

        };
    }
    static navigationOptions = {
        title: '提现',
        //header: null,  //隐藏顶部导航栏
        //tabBarVisible: false, // 隐藏底部导航栏
        headerStyle: {
            backgroundColor: '#d0162e',
            paddingTop: 18,
        },
        headerTintColor: '#fff',
        headerTitleStyle: {

        },
    }
    componentDidMount() {
        const { navigation } = this.props;
        this.setState({
            info: navigation.getParam("info"),
            truename: navigation.getParam("truename")
        });
    }
    render() {
        let { info, truename } = this.state;
        if (info == null) {
            return (
                <View></View>
            );
        }
        return (
            <View style={Styles.container}>
                <View style={{ flexDirection: 'column', justifyContent: 'center', alignItems: 'center', padding: 20, backgroundColor: '#ffffff' }}>
                    {info.State == 3 ?
                        <Image resizeMode="cover" source={require('../../image/js_img_icon_shibai.png')} /> :
                        <Image resizeMode="cover" source={require('../../image/js_img_icon_chenggong.png')} />

                    }
                    <Text style={{ color: '#666666', padding: 10 }}>{info.State == 1 ? "审核中" : (info.State == 2 ? '汇款成功' : info.Metro)}</Text>
                </View>
                <View style={{backgroundColor:'#ffffff',marginTop:10}}>
                    <Text style={{ width: width, height: 40, borderBottomColor: '#ededed', borderBottomWidth: 0.5, textAlign: 'center',color:'#666666',lineHeight:40 }}>提交信息</Text>
                    <View style={{ flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', height: 40, borderBottomColor: '#ededed', borderBottomWidth: 0.5, paddingLeft: 12 }}>
                        <Text style={{ color: '#666666' }}>订单号：</Text>
                        <Text style={{ color: '#969696', fontSize: 12 }}>{info.OrderID}</Text>
                    </View>
                    <View style={{ flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', height: 40, borderBottomColor: '#ededed', borderBottomWidth: 0.5, paddingLeft: 12 }}>
                        <Text style={{ color: '#666666' }}>开户姓名：</Text>
                        <Text style={{ color: '#969696', fontSize: 12 }}>{truename}</Text>
                    </View>
                    <View style={{ flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', height: 40, borderBottomColor: '#ededed', borderBottomWidth: 0.5, paddingLeft: 12 }}>
                        <Text style={{ color: '#666666' }}>开户银行：</Text>
                        <Text style={{ color: '#969696', fontSize: 12 }}>{info.bankname}</Text>
                    </View>
                    <View style={{ flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', height: 40, borderBottomColor: '#ededed', borderBottomWidth: 0.5, paddingLeft: 12 }}>
                        <Text style={{ color: '#666666' }}>银行卡号：</Text>
                        <Text style={{ color: '#969696', fontSize: 12 }}>{info.bankcode}</Text>
                    </View>
                    <View style={{ flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', height: 40, borderBottomColor: '#ededed', borderBottomWidth: 0.5, paddingLeft: 12 }}>
                        <Text style={{ color: '#666666' }}>提现金额：</Text>
                        <Text style={{ color: '#d0162e', fontSize: 12 }}>{info.Rmb}元</Text>
                    </View>
                </View>
            </View>
        )
    }
}


